package cn.dt70.dao.aqbUser;

import cn.dt70.pojo.AqbUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AqbUserMapper {

   //注册
    int saveUser(AqbUser aqbUser) throws Exception;
    //根据用户名查询信息防重校验
    AqbUser qryByuserCode(@Param("userCode") String userCode) throws Exception;
   //登录
    AqbUser findByCodePwd(@Param("userCode") String userCode,
                          @Param("password") String password) throws Exception;

    //根据用户id查询信息
    AqbUser qryByUserId(@Param("userId") String userId) throws Exception;

    //修改个人信息
    int updateAqbUser(AqbUser aqbUser) throws Exception;



    //根据用户名查询邮箱
    int qryEnailByUserCode(@Param("userCode")String userCode,@Param("email")String email) throws Exception;


    //后台分页查询用户信息
    List<AqbUser> getAllUserInfo(
            @Param("userCode") String userCode,//根据用户编码查询用户信息
            @Param("userName") String userName,//根据真实姓名查询用户信息
            @Param("startRow") int startRow,//初始列
            @Param("pageSize") int pageSize//每页信息数量
    )throws Exception;

    //统计信息数量
    int qryCount(@Param("userCode") String userCode,//根据用户编码查询用户信息
                 @Param("userName") String userName//根据真实姓名查询用户信息
    )throws Exception;

    //根据用户编码获取详细信息
    AqbUser getUserInfoById(@Param("userCode") String userCode) throws Exception;

    //修改钱帮币
   int updateMoney2( @Param("money")Integer money,@Param("userId")int userId) throws Exception;

   //添加邮箱
   int saveemail(String email) throws Exception;
   //根据用户名修改密码
    int updatePassword(@Param("password")String password,
                       @Param("userCode") String userCode) throws Exception;
    //根据用户名查询邮箱
    AqbUser qryEnailByUserCode(@Param("userCode")String userCode) throws Exception;
    int delUserInfo(@Param("userCode")String userCode)throws Exception;//根据用户编码删除用户

    //根据用户编码修改签到信息
    int updUserStatusByusercode(@Param("userCode") String userCode,
                                @Param("status") int status,
                                @Param("count") int count) throws Exception;
}
